package com.cyf.db.mapper;

import com.cyf.db.bean.FeeFlow;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 *
 * Created by hfy on 2017/5/10.
 */

public interface FeeFlowMapper {

    @Select("select time_key, sum(receivablefee) shouldfee, sum(paid) actualfee from local_feeflow " +
            "where type = 2 and time_key = #{timeKey} and time_type = 1 and parkingId = #{parkingId}")
    FeeFlow getByDayAndParkingId(@Param("timeKey") int timeKey, @Param("parkingId") Integer parkingId);
}
